﻿<%@ Page Language="C#" MasterPageFile="~/Templates/Public.master" AutoEventWireup="true"
    CodeFile="show-topic.aspx.cs" Inherits="show_topic" %>

<%@ Register Assembly="Jalal.Library" Namespace="Jalal.Library.Web.Control" TagPrefix="ucc" %>
<%@ Register Src="~/Controls/wucPostUser.ascx" TagName="wucPostUser" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="act" %>
<%@ Register src="Controls/wucPostWriter.ascx" tagname="wucPostWriter" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script src="Javascripts/JQuery/jquery-1.3.2.min.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="LeftContent" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table width="100%" border="0">
        <tr class="PostCategory">
            <td style="padding-left: 5px;">
                <asp:Literal ID="litPostName" runat="server"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td align="left" valign="middle" class="Seperator">
            <a href='<%= BCGC.BLL.Helper.CustomSiteMap.StartTopic + "?id=" + CategoryID %>'>
            <ucc:ThemeImage ID="ThemeImage2" runat="server" ImageUrl="new-topic.GIF" /></a>
            </a>
               
            </td>
        </tr>
        <tr>
            <td>
                <table>
                    <asp:Repeater ID="repPosts" runat="server">
                        <ItemTemplate>
                            <tr>
                                <td align="left" valign="top">
                                    <table border="0">
                                        <tr>
                                            <td style="background-color: #2F2F2F; width: 20%;" align="left" valign="top">
                                                <uc1:wucPostUser ID="wucPostUser1" runat="server" UserID='<%# Eval("UserID").ToString()%>'
                                                    ShowTotalForumPosts="true" ShowTotalMarketPosts="false" />
                                            </td>
                                            <td align="left" valign="top" style="width: 80%;">
                                                <table>
                                                    <tr>
                                                        <td style="background-color: Black;">
                                                            <%# string.Format("{0:ddd, dd MMM yyyy hh:mm tt}", Eval("PostDate"))%>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="height: 150px;" align="left" valign="top">
                                                            <%# BCGC.BLL.Forum.ForumManager.GetFormatedPost(Server.HtmlDecode(Eval("postContent").ToString())) %>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left" valign="top" style="background-color: Black;">
                                                            <table cellpadding="0" cellspacing="4">
                                                                <tr>
                                                                    <td align="left" valign="top">
                                                                        <a class="Navigation" href='<%# BCGC.BLL.Helper.CustomSiteMap.StartTopic+"?quoteid="+Eval("PostID").ToString()+"&replyid="+PostID+"&cat="+CategoryID+"&userName="+Eval("UserName").ToString() %>'>Quote</a>
                                                                        
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                    <a class="Navigation" href='<%# BCGC.BLL.Helper.CustomSiteMap.StartTopic+"?replyid="+PostID+"&cat="+CategoryID %>'>Reply</a>
                                                                        
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                        <a href="<%# BCGC.BLL.Helper.CustomSiteMap.ReportAbuse+"?postid="+Eval("PostID").ToString() %>"
                                                                            class="Navigation">Report Abuse</a>
                                                                    </td>
                                                                    <td align="left" valign="top">
                                                                        <div style="" visible='<%# (Jalal.Library.Web.SessionManager.IsUserLoggedIn==true)?true:false %>'>
                                                                        
                                                                        
                                                                        <asp:LinkButton ID="lnkPopup" runat="server" CssClass="Navigation" Visible='<%# (Jalal.Library.Web.SessionManager.IsUserLoggedIn==true)?true:false %>'>Quick Reply</asp:LinkButton>
                                                                       <act:modalpopupextender id="ModalPopupExtender1" runat="server" backgroundcssclass="Send_Private_Message_Background"
                                                                            targetcontrolid="lnkPopup" popupcontrolid="pnlSendMessage" dropshadow="false"
                                                                            cancelcontrolid="btnCancel" >
                                                                        </act:modalpopupextender>
                                                                        
                                                                        </div>
                                                                         
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <SeparatorTemplate>
                            <tr>
                                <td style="width: 100%; height: 10px; background-color: #4F4F4F;">
                                </td>
                            </tr>
                        </SeparatorTemplate>
                    </asp:Repeater>
                </table>
            </td>
        </tr>
    </table>
    <asp:Panel ID="pnlSendMessage" runat="server" CssClass="Quick_Reply"   >
        <table width="100%" border="0" align="center" style="border-color: Yellow;">
            <tr class="PostCategory">
                <td align="left" valign="top" style="padding-left: 5px;">
                    Quick Reply
                </td>
            </tr>
            <tr>
                <td align="left" valign="top">
                <uc1:wucPostWriter ID="wucPostWriter1" runat="server" />
                   
                </td>
            </tr>
            <tr>
                <td align="left" valign="top">
                    <asp:Button ID="btnCancel" CausesValidation="false" runat="server" Text="Cancel"
                        CssClass="PostButton"  />
                    <asp:Button ID="btnQuickReplySave" runat="server" Text="Save" CssClass="PostButton"
                        OnClick="btnQuickReplySave_Click" />
                </td>
            </tr>
        </table>
    </asp:Panel>
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContent" runat="Server">
</asp:Content>
